import request from '@/utils/request'

/**
 * 客户管理
 */
export default {
  page(query) {
    return request({
      url: '/api/admin/customer/query',
      method: 'get',
      params: query
    })
  },
  pageClient(query) {
    return request({
      url: '/api/admin/customer/queryClient',
      method: 'get',
      params: query
    })
  },
  addObj(obj) {
    return request({
      url: '/api/admin/customer/addOne',
      method: 'post',
      data: obj
    })
  },
  getObj(id) {
    return request({
      url: '/api/admin/customer/' + id,
      method: 'get'
    })
  },
  deleteList(list) {
    return request({
      url: '/api/admin/customer/deleteList',
      method: 'delete',
      data: list
    })
  },
  putObj(id, obj) {
    return request({
      url: '/api/admin/customer/' + id,
      method: 'put',
      data: obj
    })
  },
  all() {
    return request({
      url: '/api/admin/customer/all',
      method: 'get'
    })
  },
  queryList(query) {
    return request({
      url: '/api/admin/customer/query',
      method: 'get',
      params: query
    })
  },
  batchSave(list) {
    return request({
      url: '/api/admin/customer/batchSave',
      method: 'post',
      data: list
    })
  },
  allNotDeletList() {
    return request({
      url: '/api/admin/customer/allNotDeletList',
      method: 'get'
    })
  }
}
